# Sample program to load a PGN and display board position for every move

require 'chess-data'

File.open "test/data/games4.pgn" do |file|
  $game = ChessData::Game.from_pgn(file)
end

$game.play_game do |board, next_move|
  puts board.to_s
  puts
  puts "Move #{board.fullmove_number}: #{if board.to_move == "w" then "" else "... " end}#{next_move}"
end

